
import { http } from "@/utils/http";
import { baseUrlApi } from "@/utils/http/utils";
export type TokenResult = {
  code: number;
  message: string;
  errMessage: string;
  data: {
    /** `token` */
    accessToken: string;
    /** `accessToken`的过期时间（格式'xxxx/xx/xx xx:xx:xx'） */
    expires: Date;
  };
};

/** 刷新`token` */
export const getTokenApi = (data?: object) => {
  return http.request<TokenResult>("post", baseUrlApi("/token"), { data });
};

